Document PHP feature flag telemetry#37093
Open
leoromanovsky wants to merge 1 commit into
Open
Conversation
Contributor
Preview links (active after the
|
Contributor
|
/review |
Contributor
There was a problem hiding this comment.
🤖 Automated review by Claude. AI-generated; verify before acting.
Two small clarity/consistency points on the new metrics + troubleshooting additions. No blockers.
Reviewed 4a81902d51d3f359792b80704f64e38c6f8e7fb2 — workflow run
rtrieu
requested changes
Jun 3, 2026
Contributor
rtrieu
left a comment
There was a problem hiding this comment.
hi @leoromanovsky thanks for your PR. i left a few suggestions for specificity.
| {{< /code-block >}} | ||
|
|
||
| <div class="alert alert-warning">Evaluation context attributes must be flat primitive values: strings, numbers, and booleans. Nested arrays, objects, and null values are ignored.</div> | ||
| <div class="alert alert-warning">Evaluation context attributes must be flat primitive values: strings, numbers, and booleans. Nested arrays, objects, and null values are ignored for targeting and exposure reporting.</div> |
Contributor
There was a problem hiding this comment.
Suggested change
| <div class="alert alert-warning">Evaluation context attributes must be flat primitive values: strings, numbers, and booleans. Nested arrays, objects, and null values are ignored for targeting and exposure reporting.</div> | |
| <div class="alert alert-warning">Evaluation context attributes must be flat primitive values: strings, numbers, and Booleans. Nested arrays, objects, and null values are ignored for targeting and exposure reporting.</div> |
|
|
||
| #### Flag evaluation metrics | ||
|
|
||
| Flag evaluation counts appear in Datadog when `DD_METRICS_OTEL_ENABLED=true` is set for the PHP tracer. Each evaluation emits a `feature_flag.evaluations` counter metric tagged with the flag key, result variant, and evaluation reason. If this metric does not appear, verify the setting is enabled and the Datadog PHP SDK version supports it. |
Contributor
There was a problem hiding this comment.
Suggested change
| Flag evaluation counts appear in Datadog when `DD_METRICS_OTEL_ENABLED=true` is set for the PHP tracer. Each evaluation emits a `feature_flag.evaluations` counter metric tagged with the flag key, result variant, and evaluation reason. If this metric does not appear, verify the setting is enabled and the Datadog PHP SDK version supports it. | |
| Flag evaluation counts appear in Datadog when `DD_METRICS_OTEL_ENABLED=true` is set for the PHP tracer. Each evaluation emits a `feature_flag.evaluations` counter metric tagged with the flag key, result variant, and evaluation reason. If this metric does not appear, confirm `DD_METRICS_OTEL_ENABLED=true` is set in your environment and that your PHP tracer version supports flag evaluation metrics. |
| export DD_ENV=<YOUR_ENVIRONMENT> | ||
| export DD_VERSION=<YOUR_APP_VERSION> | ||
|
|
||
| # Required: Enable flag evaluation metrics |
Contributor
There was a problem hiding this comment.
Suggested change
| # Required: Enable flag evaluation metrics | |
| # Required for flag evaluation metrics |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The base PHP Feature Flags docs add setup and evaluation flows. Exposures and flag evaluation metrics are not ready to publish yet because the PHP telemetry path is currently blocked by a Rust version mismatch. This stacked PR queues the documentation now so it can land when that blocker is resolved, while still giving PHP customers the same guidance as the other server SDK docs for confirming flag evaluation counts and experiment exposures.
Changes
This PR extends the PHP server SDK page with
DD_METRICS_OTEL_ENABLED=true, notes that non-flat context attributes affect targeting and exposure reporting, and adds troubleshooting entries forfeature_flag.evaluationsand experiment exposures. It keeps the minimum PHP tracer prerequisite from the base docs asdatadog/dd-trace1.20.0 or later and uses the same terminology as the shared server SDK docs.Decisions
This is stacked on #37089 so the first PR can land the core PHP setup separately from telemetry docs. The troubleshooting language follows the Java server SDK structure: flag evaluation metrics are described separately from experiment exposures, and exposures are scoped to flags associated with an experiment rather than presented as standard flag behavior.
Validation
git diff --check.DD_METRICS_OTEL_ENABLED,feature_flag.evaluations, and experiment exposure troubleshooting in the stacked diff.